import React from 'react'
import {Container} from './style'

export default function ShoppingCartItem(props) {
    const {item,addcount,subcount,index,changeSelect} = props
  return (
    <Container>
        <div className="_input">
            <input checked={item.isSelect} type="checkbox" className='_input1' onChange={changeSelect.bind(null,index)} />
        </div>
        <div className="left">
            <img src={item.imgUrl1}  className="img" />
        </div>
        <div className="right">
            <div className="r-title">
                {item.title}
            </div>
            <div className="price">￥{item.price}</div>
            <svg t="1645078389242" style={item.count ==1 ? {} :{display:'none'}} className="icon2" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4643" width="20" height="20"><path d="M815.2 911.7H210.8c-55.4 0-100.7-45.3-100.7-100.7V206.5c0-55.4 45.3-100.7 100.7-100.7h604.5c55.4 0 100.7 45.3 100.7 100.7V811c0 55.3-45.3 100.7-100.8 100.7zM210.8 156.1c-30.2 0-50.4 20.1-50.4 50.4V811c0 30.2 20.1 50.4 50.4 50.4h604.5c30.2 0 50.4-20.1 50.4-50.4V206.5c0-30.2-20.1-50.4-50.4-50.4H210.8z m0 0" p-id="4644" fill="#707070"></path><path d="M714.5 533.9h-403c-15.1 0-25.2-10.1-25.2-25.2s10.1-25.2 25.2-25.2h403c15.1 0 25.2 10.1 25.2 25.2s-10.1 25.2-25.2 25.2z m0 0" p-id="4645" fill="#dbdbdb"></path></svg>
            <svg t="1645078389242" onClick={subcount.bind(null,index)} style={item.count ==1 ? {display:'none'} :{}} className="icon2" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4643" width="20" height="20"><path d="M815.2 911.7H210.8c-55.4 0-100.7-45.3-100.7-100.7V206.5c0-55.4 45.3-100.7 100.7-100.7h604.5c55.4 0 100.7 45.3 100.7 100.7V811c0 55.3-45.3 100.7-100.8 100.7zM210.8 156.1c-30.2 0-50.4 20.1-50.4 50.4V811c0 30.2 20.1 50.4 50.4 50.4h604.5c30.2 0 50.4-20.1 50.4-50.4V206.5c0-30.2-20.1-50.4-50.4-50.4H210.8z m0 0" p-id="4644" fill="#000"></path><path d="M714.5 533.9h-403c-15.1 0-25.2-10.1-25.2-25.2s10.1-25.2 25.2-25.2h403c15.1 0 25.2 10.1 25.2 25.2s-10.1 25.2-25.2 25.2z m0 0" p-id="4645" fill="#000"></path></svg>

            <div className='numsss'>{item.count}</div>
            
            <svg t="1645078446657" onClick={addcount.bind(null,index)} className="icon1" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6272" width="20" height="20"><path d="M815.2 911.7H210.8c-55.4 0-100.7-45.3-100.7-100.7V206.5c0-55.4 45.3-100.7 100.7-100.7h604.5c55.4 0 100.7 45.3 100.7 100.7V811c0 55.3-45.3 100.7-100.8 100.7zM210.8 156.1c-30.2 0-50.4 20.1-50.4 50.4V811c0 30.2 20.1 50.4 50.4 50.4h604.5c30.2 0 50.4-20.1 50.4-50.4V206.5c0-30.2-20.1-50.4-50.4-50.4H210.8z m0 0" p-id="6273" fill="#000"></path><path d="M714.5 533.9h-403c-15.1 0-25.2-10.1-25.2-25.2s10.1-25.2 25.2-25.2h403c15.1 0 25.2 10.1 25.2 25.2s-10.1 25.2-25.2 25.2z m0 0" p-id="6274" fill="#707070"></path><path d="M513 735.4c-15.1 0-25.2-10.1-25.2-25.2v-403c0-15.1 10.1-25.2 25.2-25.2s25.2 10.1 25.2 25.2v403c0 15.1-10.1 25.2-25.2 25.2z m0 0" p-id="6275" fill="#2c2c2c"></path></svg>

        </div>
    </Container>
  )
}
